import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    num: 0,
    token: "",
    userInfoSimple:{}
  },
  mutations: {
    changeUserInfo(state){
      state.num ++
    },
    logout(state){
      state.token = ''
      state.userInfoSimple = {}
    },
    rememberToken(state,token){
      state.token = token
    },
    rememberUserInfo(state,info){
      state.userInfoSimple = info
    }
  },
  actions: {
  },
  modules: {
  },
  getters:{

  }
})
